
<form id="producttypeform" class="tableform"
	action="index.php?app=yswarranty&ctl=admin_mywarranty&act=addproducttypex"
	method="post" >
	<!-- target="{update:'messagebox'}" -->
	<div class='division'>
		<h3><{t}>機種<{/t}></h3>
		<{input cols="80" rows="20" name="product_style" type="textarea" value="" vtype="required" style="width:100%"}> <br /> 
		<span>以{商品機種} 為一行的格式貼上</span><br> 
		<span>例如:</span><br> <span>尚朋堂除湿机&nbsp;YS-349DHG</span><br>
		<span>尚朋堂除湿机&nbsp;YS-321DHB</span><br> <span>纸巾机&nbsp;YS-728TM</span><br>
	</div>

	<div class="table-action"><{button label=$___b2c="保存並關閉"|t:'b2c' type="submit" class="btn-primary"}></div>
</form>

<script>

	var specForm=$('producttypeform');
	var finder = finderGroup['<{$env.get.finder_id}>'];
	var _instancedlg=$('producttypeform').getParent('.dialog').retrieve('instance');
	
	$('producttypeform').store('target',{
		onComplete:function(rs){
   			_instancedlg.close();
			finder.refresh.delay(200,finder);

   			if(rs&&!!JSON.decode(rs).success){
				// if($('specForm').getParent('.dialog'))
				//$('specForm').getParent('.dialog').retrieve('instance').close();
			}
		}
	});
	

</script>


